Skip to content

[Metrics] Pod OTEL metrics table: review follow-ups from #259552#262708

Merged
rmyz merged 2 commits intoelastic:mainfrom
rmyz:refactor/pod-metrics-table-review-followups-259552
Apr 14, 2026
Merged

[Metrics] Pod OTEL metrics table: review follow-ups from #259552#262708
rmyz merged 2 commits intoelastic:mainfrom
rmyz:refactor/pod-metrics-table-review-followups-259552

Conversation

@rmyz
Copy link
Copy Markdown
Contributor

@rmyz rmyz commented Apr 13, 2026

Summary

Follow-up to review feedback on #259552 (discussion).

  • NIT: Hoist unpackRow (unpackMetricsOtel vs unpackMetrics) outside the row loop, use for..of with destructuring, and express CPU/memory averages with const ternaries (@jennypavlova).
  • Q: Only convert memory.working_set to MB when the unpacked value is a finite number, avoiding bad division on unexpected types (@jennypavlova).

Release note

Skip — small refactor / defensive check in an internal metrics path.

Risk

Low. Behavior unchanged for valid numeric OTLP payloads; invalid values map to null for MB instead of NaN.

Hoist unpackRow in calculateMetricAverages, use for..of and const
for averages per jennypavlova review on elastic#259552.

Guard working_set byte conversion with Number.isFinite before
dividing to MB, per review question on elastic#259552.

Related: elastic#259552
Made-with: Cursor
@rmyz rmyz added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v9.4.0 v9.3.4 v8.19.15 labels Apr 13, 2026
@rmyz rmyz self-assigned this Apr 13, 2026
@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Apr 13, 2026

/ci

@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Apr 13, 2026

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #113 / discover/cascade layout grouping data fetching does not refetch when returning to a previously expanded group

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
metricsDataAccess 82.0KB 81.9KB -33.0B

History

cc @rmyz

@rmyz rmyz marked this pull request as ready for review April 13, 2026 12:55
@rmyz rmyz requested a review from a team as a code owner April 13, 2026 12:55
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 13, 2026

Approvability

Verdict: Needs human review

This PR contains mechanical refactoring (loop style, variable destructuring, ternary expressions) and adds a defensive Number.isFinite check. While the changes are low-risk code cleanup, the author does not own this file which is explicitly owned by @elastic/obs-presentation-team, warranting review by the designated owners.

You can customize Macroscope's approvability policy. Learn more.

Copy link
Copy Markdown
Contributor

@miloszmarcinkowski miloszmarcinkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested locally

@rmyz rmyz merged commit 79208d3 into elastic:main Apr 14, 2026
23 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.3, 9.4

https://github.com/elastic/kibana/actions/runs/24385315870

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.3
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@rmyz rmyz deleted the refactor/pod-metrics-table-review-followups-259552 branch April 14, 2026 07:06
kibanamachine added a commit that referenced this pull request Apr 14, 2026
#262708) (#262939)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Metrics] Pod OTEL metrics table: review follow-ups from #259552
(#262708)](#262708)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T06:53:29Z","message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","Team:obs-presentation","v9.5.0","v9.3.4","v8.19.15"],"title":"[Metrics]
Pod OTEL metrics table: review follow-ups from
#259552","number":262708,"url":"https://github.com/elastic/kibana/pull/262708","mergeCommit":{"message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3","8.19"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262708","number":262708,"mergeCommit":{"message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.15","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
kibanamachine added a commit that referenced this pull request Apr 14, 2026
#262708) (#262940)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[Metrics] Pod OTEL metrics table: review follow-ups from #259552
(#262708)](#262708)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T06:53:29Z","message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","Team:obs-presentation","v9.5.0","v9.3.4","v8.19.15"],"title":"[Metrics]
Pod OTEL metrics table: review follow-ups from
#259552","number":262708,"url":"https://github.com/elastic/kibana/pull/262708","mergeCommit":{"message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3","8.19"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262708","number":262708,"mergeCommit":{"message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.15","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
kibanamachine added a commit that referenced this pull request Apr 14, 2026
… (#262708) (#262938)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Metrics] Pod OTEL metrics table: review follow-ups from #259552
(#262708)](#262708)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T06:53:29Z","message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","Team:obs-presentation","v9.5.0","v9.3.4","v8.19.15"],"title":"[Metrics]
Pod OTEL metrics table: review follow-ups from
#259552","number":262708,"url":"https://github.com/elastic/kibana/pull/262708","mergeCommit":{"message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3","8.19"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262708","number":262708,"mergeCommit":{"message":"[Metrics]
Pod OTEL metrics table: review follow-ups from #259552
(#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.15","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
tfcmarques pushed a commit to tfcmarques/kibana that referenced this pull request Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v8.19.15 v9.3.4 v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants